import 'package:flutter/material.dart';
import 'package:flutter_app_demo/redux_demo/redux_demo.dart';

class RemoveAllItemWidget extends StatelessWidget {
    
    final ViewModel model;
    
    RemoveAllItemWidget(this.model);
    
    @override
    Widget build(BuildContext context) {
        return FlatButton(
            child: Text("delete all"),
            onPressed: (){//可简写 =>
                model.onRemoveItems();
            },
        );
    }
}

